Xbasic

FORM.TAB_OBJECT.TAB_SET Function

Syntax

Tab_Object_Name.TAB_SET( Page_Number as N )

Arguments

Page_Number

The number of the page of a multi-page tab object.

Description

The .TAB_SET() method activates the specified tab page on a tab control on a form.

When the tab page is changed, two events are fired: CanTabChange fires just before the page change, and OnTabChange fires just after the page change. You can prevent a user from changing the tab page if certain conditions are not met by attaching a script to the CanTabChange event, and using the CANCEL() command in the script to prevent the tab page from being changed.

Example

A form has a tab object called "tabbed1". The tab object has a button called "Next". This button has its "Always on top" property checked so that the button shows on all tab pages. When the user presses this button, the next tab page is displayed.

page = tabbed1.tab_get()
page = page + 1
tabbed1.tab_set(page)

Limitations

Desktop applications only.

See Also